﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Mendel
{
    public abstract class Data
    {
        private Item container = null;

        internal Item Container
        {
            get
            {
                if (container == null)
                    return new Item(this);
                else
                    return container;
            }

            set
            {
                if (value != null)
                    container = value;
            }
        }

        public abstract DType Type { get; }

        public abstract Data Convert(DType to);

        public abstract Data Clone();
    }
}
